package com.haoqi.document.template.base;

import com.haoqi.document.template.base.exception.UserException;
import org.springframework.validation.BindingResult;

public class BaseController {
    protected void doCheck(BindingResult result) {
        if (result.hasErrors()) {
            throw new UserException("", "传参异常：" + result.getAllErrors().get(0).getDefaultMessage());
        }
    }
}
